#pragma once
#ifndef OBR_SHADER_HENYEYGREENSTEIN_CUH
#define OBR_SHADER_HENYEYGREENSTEIN_CUH

#include "../common.cuh"
#include "MathDataUtils.cuh"

namespace OBR
{
static __forceinline__ __device__ float phaseHG(float cosTheta, float g)
{
    float denom = 1 + g * g + 2 * g * cosTheta;
    return M_1_PIf * 0.25f * (1 - g * g) / (denom * sqrtf(denom));
}
} // namespace OBR

#endif
